Skip to content

Instantly share code, notes, and snippets.

@ctlllll
ctlllll / longest_chinese_tokens_gpt4o.py
Created May 13, 2024 19:53
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
@dpaluy
dpaluy / README.md
Last active May 16, 2024 05:03
Download view only protected PDF from Google Drive

Step by step guide to downloading protected PDF from Google Drive

  1. Open the document in Google Docs
  2. Scroll to the bottom of the document, so all the pages are present
  3. Open Developer Tools on separate window and choose the Console tab
  4. Paste the code
  5. Have fun!
@dahlia
dahlia / job.md
Last active May 16, 2024 05:03
일자리를 찾습니다

일자리를 찾습니다

안녕하세요, 서울에 거주하는 18년차 소프트웨어 엔지니어 [홍민희]입니다.

[집안 사정]으로 일을 쉰 지 1년이 되었고, 이제 슬슬 재취업을 하려고 합니다. 1년을 쉰 만큼 이번 취업은 소프트웨어 엔지니어로서 재활을 큰 목표로 두고 있습니다. 자세한 제 소개는 [이력서]를 참고해 주세요.

제가 선호하는 업무 환경은 다음과 같습니다.

  • 프로그래밍 언어 및 플랫폼: 오래되고 검증된 Java 같은 플랫폼도 물론 좋습니다만, Rust나 Haskell처럼 비교적 최신의 PLT 연구가 반영되어 있는 언어도 즐겨 사용합니다. 비교적 능숙한 언어로는 Haskell, TypeScript, Python, C# 정도가 있고, 다른 언어라도 필요하다면 배워서 써야겠지요.
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active May 16, 2024 05:02
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@ihoneymon
ihoneymon / how-to-write-by-markdown.md
Last active May 16, 2024 05:02
마크다운(Markdown) 사용법

[공통] 마크다운 markdown 작성법

영어지만, 조금 더 상세하게 마크다운 사용법을 안내하고 있는
"Markdown Guide (https://www.markdownguide.org/)" 를 보시는 것을 추천합니다. ^^

아, 그리고 마크다운만으로 표현이 부족하다고 느끼신다면, HTML 태그를 활용하시는 것도 좋습니다.

1. 마크다운에 관하여

@dr-dimitru
dr-dimitru / minify_function.php
Last active May 16, 2024 04:59
HTML MINIFY RegEx
$re = '%# Collapse whitespace everywhere but in blacklisted elements.
(?> # Match all whitespans other than single space.
[^\S ]\s* # Either one [\t\r\n\f\v] and zero or more ws,
| \s{2,} # or two or more consecutive-any-whitespace.
) # Note: The remaining regex consumes no text at all...
(?= # Ensure we are not in a blacklist tag.
[^<]*+ # Either zero or more non-"<" {normal*}
(?: # Begin {(special normal*)*} construct
< # or a < starting a non-blacklist tag.
(?!/?(?:textarea|pre|script)\b)
@rain-1
rain-1 / llama-home.md
Last active May 16, 2024 04:58
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
@notlin4
notlin4 / without-auth_e-book_tutorial_免登入電子書教學.md
Last active May 16, 2024 04:57 — forked from aliyaliu368/without-auth_e-book_tutorial_免登入電子書教學.md
教學用電子書與相關工具免登入教學 | 本指令碼用於繞過臺灣電子書與教學工具的前端身分驗證,達成不需要教師帳號即可使用。支援 翰林、南一、康軒、何嘉仁 四大出版社 | 請勿將本指令碼作為抄答案、侵權等惡意用途,使用本指令碼,請自行承擔所有後果與風險

教學用電子書與相關工具免登入教學

使用本指令碼即代表你同意本免責聲明

免責聲明

請勿將本指令碼作為抄答案、侵權等惡意用途,使用本指令碼,請「自行承擔」所有後果與風險。

簡介

本指令碼用於繞過臺灣電子書與教學工具的前端驗證,達成不需要教師帳號即可使用。

@munshkr
munshkr / App.jsx
Last active May 16, 2024 04:56
Hydra Synth hook for React
import { useHydra } from './useHydra'
import { useEffect } from 'react'
function App() {
const [canvasRef, hydraLoaded] = useHydra()
useEffect(() => {
if (!hydraLoaded) return;
// when it's loaded, run this script:
@ochococo
ochococo / NI_GPIB-USB-HS_PyVISA_UBUNTU.md
Last active May 16, 2024 04:49
National Instruments GPIB-USB-HS via PyVISA on UBUNTU.md

National Instruments GPIB-USB-HS + PYVISA on Ubuntu

LINUX-GPIB

Install depedencies:

sudo apt-get install tk-dev build-essential texinfo texi2html libcwidget-dev libncurses5-dev libx11-dev binutils-dev bison flex libusb-1.0-0 libusb-dev libmpfr-dev libexpat1-dev tofrodos subversion autoconf automake libtool mercurial